#ifndef AUDIO_FILE_PHONON_H
#define AUDIO_FILE_PHONON_H

#include "../plok-model/audio_file.h"
#include "../plok-model/track.h"

#include <phonon/mediaobject.h>

#include <QObject>

namespace plok {
    class Audio_file_phonon : public QObject, public Audio_file
    {
        Q_OBJECT

    public:
        Audio_file_phonon (std::string fileName);
        virtual ~Audio_file_phonon (void);

        std::string get_artist_from_tag();
        std::string get_album_from_tag();
        std::string get_title_from_tag();
        std::string get_release_date_from_tag();
        std::string get_genre_from_tag();

        long long int get_duration();

        bool write_metadata_to_tag(const Track &) {return false;}

    Q_SIGNALS:
        void updateInfo (void);

    private Q_SLOTS:
        void on_metaDataChanged (void);

    private:
        Phonon::MediaObject m_mediaObject;
    };
}

#endif // AUDIO_FILE_PHONON_H
